﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using StuInfoBLL;

namespace StuInfo
{
    public partial class StuInfoListUI : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
                GridView1.DataSource = StuInfoListBLL.Select();
                GridView1.DataBind();
        }

        protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int id = Convert.ToInt32( e.Keys["Id"]);
            int num = StuInfoListBLL.Delete(id);
            if (num>0)
            {
                GridView1.DataSource = StuInfoListBLL.Select();
                GridView1.DataBind();
            }
        }
    }
}